<!-- 继承form.html模板 -->
{% extends "public/form.html" %}
{% block content %}
    <!-- 引入全局自定义组件 -->
    {% load select submit%}
    <form class="layui-form model-form" action="">
        <input name="id" id="id" type="hidden" value="{{data.id}}">
        <input name="pid" id="pid" type="hidden" value="{{data.pid|default:0}}">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">城市名称：</label>
                <div class="layui-input-inline">
                    <input name="name" value="{{data.name}}" lay-verify="required" autocomplete="off" placeholder="请输入城市名称" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">城市区号：</label>
                <div class="layui-input-inline">
                    <input name="city_code" value="{{data.city_code}}" lay-verify="required" autocomplete="off" placeholder="请输入城市区号" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">行政编码：</label>
                <div class="layui-input-inline">
                    <input name="area_code" value="{{data.area_code}}" lay-verify="required" autocomplete="off" placeholder="请输入行政编码" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">父级编号：</label>
                <div class="layui-input-inline">
                    <input name="parent_code" value="{{data.parent_code}}" lay-verify="" autocomplete="off" placeholder="请输入父级地理编号" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">城市级别：</label>
                <div class="layui-input-inline">
                    {% select "level|1|城市级别|name|id" levelList data.level|default:1 %}
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">邮政编码：</label>
                <div class="layui-input-inline">
                    <input name="zip_code" value="{{data.zip_code}}" lay-verify="required" autocomplete="off" placeholder="请输入邮政编码" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">城市简称：</label>
                <div class="layui-input-inline">
                    <input name="short_name" value="{{data.short_name}}" lay-verify="required" autocomplete="off" placeholder="请输入城市简称" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">城市拼音：</label>
                <div class="layui-input-inline">
                    <input name="pinyin" value="{{data.pinyin}}" lay-verify="required" autocomplete="off" placeholder="请输入城市拼音" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">城市经度：</label>
                <div class="layui-input-inline">
                    <input name="lng" value="{{data.lng}}" lay-verify="required" autocomplete="off" placeholder="请输入城市坐标中心点经度" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">城市纬度：</label>
                <div class="layui-input-inline">
                    <input name="lat" value="{{data.lat}}" lay-verify="required" autocomplete="off" placeholder="请输入城市坐标中心点纬度" class="layui-input" type="text">
                </div>
            </div>
        </div>
        {% submit "submit|立即保存,close|关闭" 1 "" %}
    </form>
{% endblock %}